{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 导入库\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "【例1】已知某地某一天，记录了8个整点的气温数据，整点分别是2、5、8、11、14、17、20、23，对应的气温分别是29、27、30、32、33、29、27、27。请以整点时刻为X轴，气温为Y轴，绘制出当天气温变化的折线图。\n",
    "\n",
    "【分析】作为X轴坐标的整点时刻，构成的是一维数组[2,5,8,11,14,17,20,23]，注意这是一个等差数列，可以考虑用python的range生成；作为Y轴坐标的气温，对应构成的一维数组是[29,27,30,32,33,29,27,27]。把这两个一维数组作为参数传递给plot函数。\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "【例2】改善例1的图效果，线的形状改为短线段组成的虚线('--')，点的标记选取为实心圆('o')，颜色设置为红色('r')。我们依次试着选取一个、二个、以及全部三个的设置，看下运行结果。\n",
    "\n",
    "【分析】"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
